package com.carrentalssm.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.carrentalssm.dao.CarRentalDao;
import com.carrentalssm.entity.CarRental;

//逻辑操作
@Service
public class CarRentalService {
	
	@Resource
	private CarRentalDao carRentalDao;
	
	//添加
	public int add(CarRental carRental) {
		return carRentalDao.add(carRental);
	}
	
	//查询所有
	public List<CarRental> selectAll() {
		return carRentalDao.selectAll();
	}
	
	//根据用户名查询
	public List<CarRental> selectByUsername(String username) {
		return carRentalDao.selectByUsername(username);
	}

}
